import request from '@/utils/request'

// 创建员工部门
export function createStaffDept(data) {
  return request({
    url: '/biz/staff-dept/create',
    method: 'post',
    data: data
  })
}

// 更新员工部门
export function updateStaffDept(data) {
  return request({
    url: '/biz/staff-dept/update',
    method: 'put',
    data: data
  })
}

// 删除员工部门
export function deleteStaffDept(id) {
  return request({
    url: '/biz/staff-dept/delete?id=' + id,
    method: 'delete'
  })
}

// 获得员工部门
export function getStaffDept(id) {
  return request({
    url: '/biz/staff-dept/get?id=' + id,
    method: 'get'
  })
}

// 获得员工部门分页
export function getStaffDeptPage(query) {
  return request({
    url: '/biz/staff-dept/page',
    method: 'get',
    params: query
  })
}

// 导出员工部门 Excel
export function exportStaffDeptExcel(query) {
  return request({
    url: '/biz/staff-dept/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}
